package com.sunwayhorizo.health.hl7.persistent.pk;

import java.io.Serializable;

public class RimCoreEntyPartQlfrsPK implements Serializable {
    public Long entityId;
    public Long entityNameId;
    public Long entityNamePartId;
    public Long entityVersionNum;
    public String qualifierCode;

    public RimCoreEntyPartQlfrsPK() {
    }

    public RimCoreEntyPartQlfrsPK(Long entityId, Long entityNameId, 
                                  Long entityNamePartId, Long entityVersionNum, String qualifierCode) {this.entityId = entityId;
        this.entityNameId = entityNameId;
        this.entityNamePartId = entityNamePartId;
        this.entityVersionNum = entityVersionNum;
        this.qualifierCode = qualifierCode;
    }

    public boolean equals(Object other) {
        if (other instanceof RimCoreEntyPartQlfrsPK) {
            final RimCoreEntyPartQlfrsPK otherRimCoreEntyPartQlfrsPK = (RimCoreEntyPartQlfrsPK) other;
            final boolean areEqual = 
                (otherRimCoreEntyPartQlfrsPK.entityId.equals(entityId) && otherRimCoreEntyPartQlfrsPK.entityNameId.equals(entityNameId) && otherRimCoreEntyPartQlfrsPK.entityNamePartId.equals(entityNamePartId) && otherRimCoreEntyPartQlfrsPK.entityVersionNum.equals(entityVersionNum) && otherRimCoreEntyPartQlfrsPK.qualifierCode.equals(qualifierCode));
            return areEqual;
        }
        return false;
    }

    public int hashCode() {
        return super.hashCode();
    }
}
